﻿using System.Web;
using CustomerAssistant.Core;
using System.IO;

namespace PlugInTest
{
    public class TestClientHandle3 : IClientHandle
    {
        public void Response(HttpRequest Request, Stream OutputStream)
        {
            if (string.Compare(Request[Util.REQUEST_KEY], RequestKey, true) == 0)
            {
                using (StreamWriter sw = new StreamWriter(OutputStream))
                {
                    sw.Write("这是来自插件的test3");
                }
                
            }
            else
            {
                if (NextNode != null)
                    NextNode.Response(Request, OutputStream);
            }
        }

        public IClientHandle NextNode
        {
            get;
            set;
        }

        public string RequestKey
        {
            get
            {
                return "test3";
            }
        }
    }
}